using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class too_nssfBillMap : EntityTypeConfiguration<too_nssfBill>
    {
        public too_nssfBillMap()
        {
            // Primary Key
            this.HasKey(t => new { t.number, t.TransId, t.date, t.Type, t.Type_id, t.item, t.desc, t.id, t.patient_Due, t.Guar1_due, t.Guar2_due, t.ins1perc, t.ins2perc, t.DiscountA, t.qtyship, t.Guar1_K_Value, t.Guar1_K_UNIT, t.Guar1_ARE_Value, t.Guar1_ARE_UNIT, t.Guar1_OR_UNIT, t.Guar1_OR_Unit_Amount, t.Guar1_OR_Ext_Amount, t.Guar1_OR_Value });

            // Properties
            this.Property(t => t.number)
                .IsRequired()
                .HasMaxLength(8);

            this.Property(t => t.Bill_)
                .HasMaxLength(8);

            this.Property(t => t.vglbatch)
                .HasMaxLength(10);

            this.Property(t => t.TransId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Type)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.Type_id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.item)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.desc)
                .IsRequired()
                .HasMaxLength(250);

            this.Property(t => t.id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("too_nssfBill");
            this.Property(t => t.number).HasColumnName("number");
            this.Property(t => t.Bill_).HasColumnName("Bill#");
            this.Property(t => t.vglbatch).HasColumnName("vglbatch");
            this.Property(t => t.TransId).HasColumnName("TransId");
            this.Property(t => t.criteria).HasColumnName("criteria");
            this.Property(t => t.date).HasColumnName("date");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.Type_id).HasColumnName("Type_id");
            this.Property(t => t.item).HasColumnName("item");
            this.Property(t => t.desc).HasColumnName("desc");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.patient_Due).HasColumnName("patient Due");
            this.Property(t => t.Guar1_due).HasColumnName("Guar1_due");
            this.Property(t => t.Guar2_due).HasColumnName("Guar2_due");
            this.Property(t => t.ins1perc).HasColumnName("ins1perc");
            this.Property(t => t.ins2perc).HasColumnName("ins2perc");
            this.Property(t => t.DiscountA).HasColumnName("DiscountA");
            this.Property(t => t.qtyship).HasColumnName("qtyship");
            this.Property(t => t.OPERATIONSERIAL).HasColumnName("OPERATIONSERIAL");
            this.Property(t => t.Guar1_K_Value).HasColumnName("Guar1_K_Value");
            this.Property(t => t.Guar1_K_UNIT).HasColumnName("Guar1_K_UNIT");
            this.Property(t => t.Guar1_K_unit_amount).HasColumnName("Guar1_K_unit_amount");
            this.Property(t => t.Guar1_K_ext_amount).HasColumnName("Guar1_K_ext_amount");
            this.Property(t => t.Guar1_ARE_Value).HasColumnName("Guar1_ARE_Value");
            this.Property(t => t.Guar1_ARE_UNIT).HasColumnName("Guar1_ARE_UNIT");
            this.Property(t => t.Guar1_ARE_unit_Amount).HasColumnName("Guar1_ARE_unit_Amount");
            this.Property(t => t.Guar1_ARE_ext_Amount).HasColumnName("Guar1_ARE_ext_Amount");
            this.Property(t => t.Guar1_OR_UNIT).HasColumnName("Guar1_OR_UNIT");
            this.Property(t => t.Guar1_OR_Unit_Amount).HasColumnName("Guar1_OR_Unit_Amount");
            this.Property(t => t.Guar1_OR_Ext_Amount).HasColumnName("Guar1_OR_Ext_Amount");
            this.Property(t => t.Guar1_OR_Value).HasColumnName("Guar1_OR_Value");
            this.Property(t => t.Guar1_L_UNIT).HasColumnName("Guar1_L_UNIT");
            this.Property(t => t.Guar1_L_Value).HasColumnName("Guar1_L_Value");
            this.Property(t => t.Guar1_L_Amount).HasColumnName("Guar1_L_Amount");
            this.Property(t => t.Guar1_R_UNIT).HasColumnName("Guar1_R_UNIT");
            this.Property(t => t.Guar1_R_Value).HasColumnName("Guar1_R_Value");
            this.Property(t => t.Guar1_R_Amount).HasColumnName("Guar1_R_Amount");
            this.Property(t => t.Guar1_A_UNIT).HasColumnName("Guar1_A_UNIT");
            this.Property(t => t.Guar1_A_value).HasColumnName("Guar1_A_value");
            this.Property(t => t.Guar1_A_Amount).HasColumnName("Guar1_A_Amount");
            this.Property(t => t.Guar1_N_UNIT).HasColumnName("Guar1_N_UNIT");
            this.Property(t => t.Guar1_N_Value).HasColumnName("Guar1_N_Value");
            this.Property(t => t.Guar1_N_Amount).HasColumnName("Guar1_N_Amount");
            this.Property(t => t.Guar2_K_UNIT).HasColumnName("Guar2_K_UNIT");
            this.Property(t => t.Guar3_K_Value).HasColumnName("Guar3_K_Value");
            this.Property(t => t.Guar2_K_unit_amount).HasColumnName("Guar2_K_unit_amount");
            this.Property(t => t.Guar2_K_ext_amount).HasColumnName("Guar2_K_ext_amount");
            this.Property(t => t.Guar2_ARE_UNIT).HasColumnName("Guar2_ARE_UNIT");
            this.Property(t => t.Guar2_ARE_Value).HasColumnName("Guar2_ARE_Value");
            this.Property(t => t.Guar2_ARE_unit_Amount).HasColumnName("Guar2_ARE_unit_Amount");
            this.Property(t => t.Guar2_ARE_ext_Amount).HasColumnName("Guar2_ARE_ext_Amount");
            this.Property(t => t.Guar2_OR_UNIT).HasColumnName("Guar2_OR_UNIT");
            this.Property(t => t.Guar2_OR_Value).HasColumnName("Guar2_OR_Value");
            this.Property(t => t.Guar2_OR_Unit_Amount).HasColumnName("Guar2_OR_Unit_Amount");
            this.Property(t => t.Guar2_OR_Ext_Amount).HasColumnName("Guar2_OR_Ext_Amount");
            this.Property(t => t.Guar2_L_UNIT).HasColumnName("Guar2_L_UNIT");
            this.Property(t => t.Guar2_L_Value).HasColumnName("Guar2_L_Value");
            this.Property(t => t.Guar2_L_Amount).HasColumnName("Guar2_L_Amount");
            this.Property(t => t.Guar2_R_UNIT).HasColumnName("Guar2_R_UNIT");
            this.Property(t => t.Guar2_R_Value).HasColumnName("Guar2_R_Value");
            this.Property(t => t.Guar2_R_Amount).HasColumnName("Guar2_R_Amount");
            this.Property(t => t.Guar2_A_UNIT).HasColumnName("Guar2_A_UNIT");
            this.Property(t => t.Guar2_A_value).HasColumnName("Guar2_A_value");
            this.Property(t => t.Guar2_A_Amount).HasColumnName("Guar2_A_Amount");
            this.Property(t => t.Guar2_N_UNIT).HasColumnName("Guar2_N_UNIT");
            this.Property(t => t.Guar2_N_Value).HasColumnName("Guar2_N_Value");
            this.Property(t => t.Guar2_N_Amount).HasColumnName("Guar2_N_Amount");
            this.Property(t => t.patient_K_UNIT).HasColumnName("patient_K_UNIT");
            this.Property(t => t.Patient_K_Value).HasColumnName("Patient_K_Value");
            this.Property(t => t.Patient_K_unit_amount).HasColumnName("Patient_K_unit_amount");
            this.Property(t => t.Patient_K_ext_amount).HasColumnName("Patient_K_ext_amount");
            this.Property(t => t.patient_ARE_UNIT).HasColumnName("patient_ARE_UNIT");
            this.Property(t => t.patient_ARE_Value).HasColumnName("patient_ARE_Value");
            this.Property(t => t.Patient_ARE_unit_Amount).HasColumnName("Patient_ARE_unit_Amount");
            this.Property(t => t.Patient_ARE_ext_Amount).HasColumnName("Patient_ARE_ext_Amount");
            this.Property(t => t.patient_OR_UNIT).HasColumnName("patient_OR_UNIT");
            this.Property(t => t.patient_OR_Value).HasColumnName("patient_OR_Value");
            this.Property(t => t.Patient_OR_Unit_Amount).HasColumnName("Patient_OR_Unit_Amount");
            this.Property(t => t.Patient_OR_Ext_Amount).HasColumnName("Patient_OR_Ext_Amount");
            this.Property(t => t.patient_L_UNIT).HasColumnName("patient_L_UNIT");
            this.Property(t => t.patient_L_Value).HasColumnName("patient_L_Value");
            this.Property(t => t.patient_L_Amount).HasColumnName("patient_L_Amount");
            this.Property(t => t.patient_R_UNIT).HasColumnName("patient_R_UNIT");
            this.Property(t => t.patient_R_Value).HasColumnName("patient_R_Value");
            this.Property(t => t.patient_R_Amount).HasColumnName("patient_R_Amount");
            this.Property(t => t.patient_A_UNIT).HasColumnName("patient_A_UNIT");
            this.Property(t => t.patient_A_value).HasColumnName("patient_A_value");
            this.Property(t => t.patient_A_Amount).HasColumnName("patient_A_Amount");
            this.Property(t => t.patient_N_UNIT).HasColumnName("patient_N_UNIT");
            this.Property(t => t.Pat_N_Value).HasColumnName("Pat_N_Value");
            this.Property(t => t.Pat_N_Amount).HasColumnName("Pat_N_Amount");
            this.Property(t => t.Total_g1).HasColumnName("Total_g1");
            this.Property(t => t.total_g2).HasColumnName("total_g2");
            this.Property(t => t.Total_patient).HasColumnName("Total_patient");
            this.Property(t => t.unit_price_g1).HasColumnName("unit_price_g1");
            this.Property(t => t.unit_price_g2).HasColumnName("unit_price_g2");
            this.Property(t => t.unit_price_patient).HasColumnName("unit_price_patient");
        }
    }
}
